
@model List<ToDo.Models.ItemViewModels>
@{
    ViewData["Title"] = "SearchReasult";
}

@section Style{
<link href="~/css/Item/searchResult.css" rel="stylesheet" />
}

<table class="showItems" id="SearchResult-findItem">
    @foreach(var itemInModel in Model)
    {
        <tr class="oneItem">
            <td>
                <div class="circlde"><div id="inside-circle" onclick="changeBackground();"></div></div>
            </td>
            <td class="searchItemContent">
                <form action="/Item/ChangeItem" method="post">
                    <input name="itemId" value="@itemInModel.ItemId" type="hidden"/>
                    <input type="submit"value="@itemInModel.Content" class="input-inventory-name"/>
                </form>
            </td>
            <td class="showTime">
                @itemInModel.CreateTime.Month/@itemInModel.CreateTime.Day
                &nbsp;&nbsp;@itemInModel.CreateTime.Hour:@itemInModel.CreateTime.Minute
            </td>
            <td>
                <a onclick="deleteItemInSearch(@itemInModel.ItemId)" data-toggle="modal" data-target="#findItem-delete">
                    <img src="~/images/Item/删除.png"  class="findItem-delete-img"  />
                </a>
            </td>
        </tr>
    }
</table>
<div class="modal fade" id="findItem-delete">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">
                    你确定要删除吗？
                </h4>
            </div>
            <div class="modal-footer">
                <input type="hidden" name="itemId" id="itemId" />
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    取消
                </button>
                <button type="button" class="btn btn-primary" onclick="deleteInSearch()">
                    确定
                </button>
            </div>
        </div>
    </div>
</div>
@section Scripts{
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="~/js/index.js"></script>
}